library scim.base;

uses
  SysUtils,
  Classes,
  Math,
  sci.types in '..\..\sci.types.pas',
  sci.expression in '..\..\sci.expression.pas',
  sci.constants in '..\..\sci.constants.pas',
  sci.log in '..\..\sci.log.pas',
  sci.functions in '..\..\sci.functions.pas';

{$R *.res}

function GetFuncs: TStringList;
begin
  Result := TStringlist.Create;
  Result.Add('abs');
  Result.Add('acos');
  Result.Add('floor');
  Result.Add('sin');
  Result.Add('sqrt');
end;

function _abs(p: TFuncParams): TValue;
begin
  Result := abs(p[1]);
end;

function _acos(p: TFuncParams): TValue;
begin
  Result := arcCos(p[1]);
end;

function _floor(p: TFuncParams): TValue;
begin
  Result := floor(p[1]);
end;

function _sin(p: TFuncParams): TValue;
begin
  Result := sin(p[1]);
end;

function _sqrt(p: TFuncParams): TValue;
begin
  Result := sqrt(p[1]);
end;

exports
  GetFuncs,
  _abs,
  _acos,
  _floor,
  _sin,
  _sqrt;

begin
end.
